package com.yusheng.tr.common.core.openfeign.base;


import com.yusheng.tr.common.core.openfeign.factory.SysMenuFeignServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.Set;

/**
 * @ClassName jiang_jun_qin
 * @date 2023/4/11 15:36
 * @Version 1.0
 */
@FeignClient(value = "school-system",contextId = "sysMenuFeign",fallbackFactory = SysMenuFeignServiceFallback.class)
public interface ISysMenuFeignService {

    @GetMapping(value = "/inner/select/menu/perms/by/roleId",consumes= MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    Set<String> selectMenuPermsByRoleId(@RequestParam("roleId") Long roleId);


    @GetMapping(value = "/inner/select/menu/perms/by/userId",consumes= MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    Collection<String> selectMenuPermsByUserId(@RequestParam("userId") Long userId);
}
